Methods and Systems for Using Script Files to Obtain, Format and Transport Data

ABSTRACT

Embodiments of the invention can include a system and method for managing a plurality of data feeds to be loaded into a database. The method includes obtaining a script which specifies a query. The method includes executing the query against a source to extract a result set and consulting the script to determine a format for the data feed. The method also includes converting the result set in accordance with the format to create the data feed and transporting the data feed to be loaded into the database.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation-In-Part of U.S. patent application Ser. No. 11/266,949, filed Nov. 5, 2005, entitled “Methods And Systems For Using Script Files To Obtain, Format And Disseminate Database Information,” which is a Continuation-In-Part of U.S. patent application Ser. No. 10/889,656 filed Jul. 12, 2004, which claims the benefit of U.S. Provisional Patent Application Ser. No. 60/559,765, filed on Apr. 6, 2004, all of which applications are hereby incorporated by reference herein.

FIELD OF THE INVENTION

The present invention relates generally to database systems, and, more particularly, to methods and systems for using script files to obtain, format, and disseminate database information.

BACKGROUND OF THE INVENTION

Organizations such as financial institutions are responsible for maintaining a large number of data feeds. These data feeds are typically produced at certain times of the day and delivered in electronic form to various users. An example of a data feed is a spreadsheet file containing information obtained from a database. A typical recipient would be an employee in the organization such as a financial analyst.

Typically, a computer program must be written in a high-level language such as C++ or JAVA for each data feed which is desired. Thus, an end-user who wishes to have information obtained from a database would have a special program written by a programmer that defines the database to access along with the SQL commands to execute. The program would need to interact with various systems to have the information sent to the recipient in the proper format.

Unfortunately, the conventional approach has many drawbacks. Each request for information requires a programmer to code a separate program. Because of the expertise required for this task, it often takes a considerable amount of time to implement even a relatively simple request. Furthermore, this approach leads to a proliferation of programs written in a variety of different languages that can be difficult and expensive to maintain. Accordingly, improved methods and systems for managing a plurality of data feeds are needed.

SUMMARY OF THE INVENTION

The present invention provides improved methods and systems for using script files to obtain, format and disseminate database information.

According to an aspect of the invention, a computer-implemented method for managing a plurality of data feeds is provided. The computer-implemented method for managing a plurality of data feeds includes the steps of obtaining a script, the script for specifying a query and creating a data feed; executing the query against a database to produce a result set; and formatting the result set in accordance with the script to create the data feed. The script preferably also specifies a manner in which the data feed is to be formatted (such as a flat file, a spreadsheet file, an HTML file, an XML file, or a PDF file) and a transport method (such as electronic mail (e-mail), file transfer protocol (FTP, Java Message Service (JMS) or other methods known to one skilled in the art.

Preferably, the script specifies the database name and logon parameters. The query preferably references a procedure that executes SQL commands against the named database. The script can be stored as a text file written in a suitable specification language to provide direction as to obtaining, formatting, and disseminating the desired information.

Embodiments of the invention include a front-end system for managing data feeds to a user from a database. A database server back-end system employs pre-defined scripts to obtain, format, and disseminate the information in the proper, desired format. The front-end system of the present invention is a front-end system that allows the user to more easily select information to be obtained, and to select the type and format of report to be generated. The system provides screens with buttons and input fields for use by the user. Upon the user's request, the front-end system requests a menu definition, such as an XML menu, from the database server, and the front-end system is configured based on the menu definitions. After the user enters in the requested information, the requested information is retrieved from the database server system and displayed in the proper, desired format.

Embodiments of the invention can include a system and method for managing a plurality of data feeds. The method can include requesting, by a front-end system, a menu definition from a back-end system. The menu definition can include an XML menu definition. The method can include receiving, at the front-end system, the menu definition, configuring, at the front-end system, a user interface from the menu definition, and displaying, at the user interface, input fields and/or buttons. The method can also include receiving, at the user interface, inputs from a user, prompting the user to enter necessary parameters, preparing a request at the front-end system, sending the request to the back-end system, processing the request at the back-end system, and sending the request from the front-end system to the back-end system.

Further embodiments of the invention include a computer implemented method of managing data feeds from a source to a database. The method includes the steps of obtaining a script, the script specifying a query for a file, executing the query to search for a file and transporting the file in a given format to be loaded into the database.

Embodiments of the invention can include adding a feature, referred to herein as “Control Feeds,” to the script to allow a degree of flow of control within the script file.

Other embodiments of the invention preferably include adding a feature, referred to herein as “Schedule Feeds,” to the script to allow part of the script or any feed within in the script to be identified by a schedule.

These and other aspects, features and advantages of the present invention will become apparent from the following detailed description of preferred embodiments, which is to be read in connection with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a high-level diagram of an exemplary system for disseminating database information.

FIG. 2 is an exemplary script file for sending a data feed as an e-mail attachment;

FIG. 3 is an exemplary flow chart outlining a method for disseminating database information;

FIG. 4 is an exemplary flow diagram illustrating a method for disseminating database information;

FIG. 5 is an exemplary flow chart illustrating a method for disseminating database information;

FIG. 6 is an exemplary screen shot of an interface for disseminating database information;

FIG. 7 is an exemplary portion of code that defines the functionality of the interface of FIG. 6;

FIG. 8 is an exemplary portion of code that defines the functionality of the interface of FIG. 6;

FIG. 9 is an exemplary screen shot of an interface for disseminating database information;

FIG. 10 is an exemplary screen shot of an interface for disseminating database information;

FIG. 11 is an exemplary portion of code that defines the functionality of the interface of FIG. 10;

FIG. 12 is an exemplary screen shot of an interface for disseminating database information;

FIG. 13 is an exemplary screen shot of an interface for disseminating database information;

FIG. 14 is an exemplary portion of code that defines the functionality of the interface of FIG. 10;

FIG. 15 is a high-level diagram of an exemplary system for loading information into a database;

FIG. 16 is an exemplary flow chart outlining a method for loading information into a database;

FIG. 17 is an exemplary script file for loading a flat file into a database via a stored procedure; and

FIG. 18 is an exemplary script file as part of a test harness.

It is to be understood that the attached drawings are for purposes of illustrating the concepts of the invention

DETAILED DESCRIPTION OF THE INVENTION

Referring to FIG. 1, a system for disseminating database information 100 includes a Server 120 that executes a program for accessing a Script File 122 to obtain instructions for creating, formatting and forwarding a data feed. Typically, the Script File 122 contains a series of custom instructions written in a text-based script language. As an example, the Server 120 might be instructed to access a particular database to retrieve specified information and format this information in a particular manner for a designated user.

The Server 120 is operatively coupled to a Database Server 150 such that a plurality of predefined database commands (e.g., SQL commands) is executed. As depicted in FIG. 1, the Database Server 150 includes a SQL Commander 156 for selecting and executing a query against a Database 158. When the Database Server 150 is called, a request for a particular set of SQL commands is received and the SQL Commander 156 selects the pertinent query for the Database 158. The SQL Commander 156 executes the predefined SQL statements, and returns a result set to the Database Server 150. In turn, the Database Server 150 returns the result set to the Server 120.

Once the result set for the particular query is received, the Script File 122 is again consulted to determine the format for the data feed. In general, the result set will be in a form that is not readable. The result set will be convened to a suitable format such as a flat file, an Excel spreadsheet file, a Word file, or a PDF file. In order to convert the result set into the specified format, the Server 120 calls a Conversion Module 124 for this purpose. The Conversion Module 124 could be an off-the-shelf module or one that is specially written. Preferably, the Conversion Module 124 will be implemented in such a way that various different formats are supported and additional ones are easily added.

Referring to FIG. 2, an exemplary script file 122 is illustrated. The script file 122 shown in FIG. 2 instructs the Server 120 to create a flat file and to send the flat file as an e-mail attachment. The Server 120 interfaces with an e-mail system 180 in order to accomplish the task. It is to be appreciated that the script file 122 shown in FIG. 2 is provided for illustrative purposes.

As depicted in FIG. 2, the script file 122 appears as a series of commands in a text file. The syntax for the Script File 122 shown and discussed herein involves a syntax that is close to that of a JAVA properties file. However, it is to be appreciated that the script file could be written in another suitable language so long as it is capable of defining the way in which the data feed is to be created, formatted and disseminated. However, the use of a JAVA properties file for this purpose is a preferred method of creating the Script File 122.

As will be discussed in greater detail, the exemplary Script File 122 shown in FIG. 2 sets forth each of the parameters needed by the Server 120 to create, format and deliver the data feed. Line 1 of this file is a comment since it starts with the number (#) sign. Lines 2 and 3 define the user name and password. Line 4 defines the server name. In this case, it is PDSSQL_EDGLN1. Line 5 defines the procedure to call that is executed by the Database Server 150. Various parameters would typically be passed. Line 6 is another comment. Lines 7 and 8 define the types of feed. In this case, the feed is named “Moss” and is a flat file. Line 9 is comment. Lines 10-14 define the transport method. In this case, the method is e-mail and the message will include the subject line “Moss Settlement Fails” and the body of the message will contain the words “CSV File” The e-mail address of the recipient is also indicated. Line 15 is another comment. Lines 16-19 define the file name and column formats. In this case, the file name will be “sett_fail” and the extension for the file would be “.csv”. The file separator would be a comma. Dates would be indicated as left justified in the format yyyy-MM-dd.

Referring to FIG. 3, an exemplary method for disseminating database information is illustrated.

First, in step 302, a script file is obtained to determine instructions for creating, formatting and disseminating a data feed. As discussed above, the script file is preferably a JAVA properties file. The script file will typically include the name of the database to access as well as the user id and password information. Next, in step 304, database access is established and a call to a database server is done. The database server will receive information regarding a set of SQL predefined commands to access. In step 306, the database server queries the database with the predefined SQL commands. In step 308, a result set for the particular query is received.

Once the result set is available the script file is consulted to determine the proper format and transport method. In step 310, a conversion module is called to format the result set into the proper format specified by the script file. Finally, in step 312, the converted file is delivered to the recipients indicated in the script file, and processing ends.

The invention will be clarified by the following example.

Example Properties File

A properties file is located in $HOME/properties. The name should be in the format “<name><region>.properties” where <name> is the name given to the feed and <region> is ln, ny, tk or blank. (A region is a geographic area where processing is to take place, such as London, New York or Tokyo).

Specifying the Feeds

The invention can invoke one or more different generic data feeds. The feeds to be invoked are specified by the ‘FeedNames’ property and the type of each feed is specified by the ‘<name>Type’ property where <name> appears as one of the values in the ‘FeedNames’ property. The feeds and their type enter properties are specified according to the format below.

   SystemFeed.FeedNames = <list of names>    SystemFeed.<name>Type = <type> where    <list of names> is one or more names separated by spaces.    <name> is the name that appears in the <list of names> above.    <type> is the generic type of the feed (currently FlatFile, HtmlFile, ExcelFile and FileLoader are supported). A ‘<name>Type’ property must be specified for each name in the <list of names>. The feeds will be started in the order in which they are specified in the <list of names>.

Calling the Stored Procedure

Data feeds of type ‘FlatFile’, ‘HtmlFile’, ‘ExcelFile’ and ‘FileLoader’ can call a stored procedure. The procedure name and parameters are specified in the properties file as follows. Note the full stop at the start of the line—it denotes that the property name should not have the class name prepended.

   .<name>.proc_to_call = { call <proc>(<list of params>) } where    <name> is the name of the feed.    <proc> is the name of the stored procedure to be called.    <list of params> is a list of parameters separated by commas. Each parameter in <list of params> is of the following form.    [<reg>;<type>;<value>] where    <reg> specifies whether the parameter in an ‘IN’, ‘OUT’ or    ‘INOUT’ parameter.    <type> indicates the SQL type of the parameter as defined in    java.sql.Types.java.    <value> is one of the values in the Table 1 below.

TABLE 1 Value Parameter passed to stored procedure hard-coded value Given value converted to appropriate type %FEEDDATE% Value of “-d” parameter, or if no “-d” then the current date %NULL% Null value of the appropriate type %-<single char>% Value immediately following “-<single char>” in feed parameters

All “float” and “double” floating-point variables passed to the stored procedure are passed as BigDecimal types to avoid rounding errors. If a particular “-<single char>” parameter is specified in the parameter list but is not given in the feed parameters then a null value of the appropriate type will be passed instead.

Calling SQL

Feeds of type ‘FileLoader’ can also call inline SQL. The SQL is specified in the properties file as follows. Note the full stop at the start of the line—it denotes that the property name should not have the class name prepended.

.<name>.sql_to_call=<SQL>

Parameter values passed to the feed and %FEEDDATE% can be substituted into the SQL in the same way as they are substituted into stored procedures as described above.

Outputting Result Sets

The file name (or names) in which to output the result set (or sets) returned by the stored procedure are specified as in the properties file that follows. If the “FileName” property has the value “SeparateFiles” then each result set will be written to a separate file with the first result set returned being written to the file name specified by the “FileName1” property etc.

Either    <name>.FileName = <file name> or    <name>.FileName = SeparateFiles    <name>.FileName1= <file name 1>    <name>.FileName2= <file name 2>    ...    <name>.FileName<n> = <file name n> where    <name> is the name of the feed.    <file name> is any file name with substitutions performed as in    the table below.    <n> should match with the number of result sets returned by the    stored procedure.

The value of the FileName property may contain certain values which are substituted as shown in Table 2 below.

TABLE 2 Value in file name Value that is substituted %FEEDDATE% Value of “-d” parameter, or if no “-d” then the current date %FEEDREGION% Value of FileRegion property in properties file or none is given, the feed region passed into the feed. %-<single char>% Value immediately following “-<single char>” in feed parameters

Configuration Properties

Other properties allow further configuration of the feed as shown in Table 3 below. The property name should have either “*.” or “<feed name>.” prepended depending on whether it applies to all feeds or a single feed. All properties with string values default to null and all properties with boolean values default to ‘false’. Any property values of the form ‘$<variable>’ are assumed to be environment variables and the <value> passed as a system property parameter (i.e. as -D<variable>=<value>) will be substituted.

TABLE 3 Property Configures Value Applies to TMinusOne Changes the feed date to T − 1 true or false Flat File Html File Excel File Load File ResultSetSeparator Text to be output between result sets Any string Flat File ResultSetPre The text to appear before the result set Any string or Html File HTML ResultSetPost The text to appear after the result set Any string or Html File HTML ResultSetCaption The caption for the table the result set Any HTML Html File appears in CompletionFileName The name of a file to be sent after the Any string Flat File feed file is sent Html File Excel File FileExt The file extension to be appended Any string Flat File Html File Excel File Load File FileRegion Populates %FEEDREGION% in the Any string Flat File feed file name Html File Excel File Load File ReportsDir The directory where the file should be Any directory Flat File written (before/after transporting or Html File copying to sent directory Excel File Load File TransportMethod Method by which the file is FTP, ESITRAN, Flat File transported (if more than one method MAIL (not for Html File is required they should be separated by Load File) or Excel File whitespace) NONE Load File TransportLater If set to true the file will be true or false Flat File transported by the next feed which has HtmlFile the property unset or set to false. Can Excel File be used to send files from separate feeds in the one e-mail. DateSuffix Is date to be appended when moved to true or false Flat File SENT directory Html File Excel File Load File ShowHeaders Are column headings to be written as a true or false Flat File header row Html File Excel File FileSeparator The text that separates field values Any string FlatFile StartingSeparator Should a FileSeparator appear at the true or false FlatFile start of the line EndingSeparator Should a FileSeparator appear at the true or false FlatFile end of the line FileHeader The text that appears at the very start Any string (with FlatFile of the file. \n as necessary) FileFooter The text that appears at the very end of Any string (with FlatFile the file. \n as necessary) EOLCharacters The text that terminates a row (usually Any string FlatFile \n or \n\r) ShowWhenEmpty Should a table or sheet appear if it is true or false Html File empty Excel File SheetName The name of the sheet (use Any string Excel File SheetName<n> for result set <n> SheetOrder The order of the sheet (use $, or $ − 1 to Any number Excel File indicate the last, last but one sheet FileDateFormat Date format if %FEEDDATE% is Date format FlatFile included in the file name string HtmlFile Excel File Load File

Properties that are specific to transport and loading methods are shown in Table 4.

TABLE 4 FTPServer The FTP server FTPUser The FTP user FTPPassword The FTP user's password FTPDirectory The directory where the file should be placed on the FTP server FTPBinaryMode If set true then use binary mode ftp. Defaults to false. ESITranDir The directory from where the ESITran route copies files ESITranRoute The ESITran route identifier MAILSubject Subject of the mail MAILMessage The text body of the mail message MAILRecipient The user to which the mail is to be sent MAILCCList The CC list of the mail MAILBCCList The blind CC list of the mail LoadTable The table loaded via BCP LoadServer The server to be used by BCP LoadUser The user for BCP LoadPassword The password for BCP LoadSeparator The BCP separator

Formatting Result Sets

The values returned from the stored procedure result sets can be formatted on a type or column name basis. To format a value in the result set the format property for a particular column is applied first. If this does not exist then the format property of its generic type will be applied. If neither exist the default Java formatting is applied. The format property name should have either “*.” or “<feed name>.” prepended depending on whether it applies to all feeds or a single feed. Double and numeric types use the BigDecimal class to avoid rounding errors. The property <column name> below is the name of the table column as returned in the result set meta data.

TABLE 5 Format Property Name Formats Objects of Type Date DATE Timestamp TIMESTAMP Double DOUBLE Decimal NUMERIC Integer INTEGER, SMALLINT String CHAR, VARCHAR <column name> As specified in the result set meta data

All the above properties shown in Table 5 have value fields of the following form. The default field separator character (which is shown below) is “|” but this can be changed by including a property FormatSeparator=<string> if the <format> string needs to contain a “|” itself.

   <property>Format = <justify>|<width>|<pad>|<format> where    <justify> is LEFT, RIGHT to left, right justify the field or    IGNORE for no output    <width> is the width of the field or 0 if the field should not be padded or truncated    <pad> is the character to use to pad the field if necessary    <format> is one of the following       “.” for no formatting.       “Scale:<m>.<n>” for implied decimal places.       Any of the formats shown in java.text.DecimalFormat.java.       Any of the formats shown in       java.text.SimpleDateFormat.java.

Format strings of the form described in java.text.DecimalFormat.java may also contain the characters “FormatDecimalPlaces”. These characters are replaced by the contents of a column in the result set where the name of the column as returned in the result set meta data is “FormatDecimalPlaces”. For example to format decimal values to have the appropriate number of decimal places for their currency, return the following in a select statement

select    ct_dp_ccy as “FormatDecimalPlaces” from    CURRENCY

-   -   and specify a format such as         “*.DoubleFormat=LEFT|20∥#,##FormatDecimalPlaces” in the         properties file.

When formatting in excel format each cell type is set using the type returned for the result set column by default. This allows a user to modify the format as required in Excel. If however all the cells should be created as text cells the following property should be specified.

ExcelStyleCellFormat=false

By default, the column headings output are simply the name of the table column as returned in the result set meta data. This can be changed by the following property.

   <column>ColumnHeading=<heading> where    <column> is the name of the column as returned in    the result set meta data.    <heading> is the text string to be displayed as the column heading.

Substituting Parameter Values in Properties

Parameter values can be substituted into property values by including %-<char>% in the property value. If the parameter has been specified on the command line, then the value of the parameter will replace %-<char>% in the property value. If %-<char>% appears in a property but has not been specified on the command line then the value of the property “<char>DefaultParameter” will be substituted, if one exists. For example consider the parameter “-s” and the properties below.

*.Prop=Run for %-s %

*.sDefaultParameter=today

If -syesterday is passed as a parameter, the ‘Prop’ property value will be “Run for yesterday”, but if no -s parameter is passed as a parameter, the ‘Prop’ property value will be “Run for today”.

Embodiments of the invention can include a front-end system that allows a user to easily configure specific data requests. The results of the request can be displayed in an appropriate format via the front-end system.

The main purpose of the ‘Server’ feed type is to allow a database server feed to act as a server for a data driven Web site at a front-end system. The architecture of the web site is designed to ensure that it requires a relatively low amount of maintenance, allowing new reports to be added or existing reports to be modified without changing the front-end. In addition, such a configuration allows multiple instances to be configured in different ways.

The front-end menu structure is specified by the structure of an XML document that contains the menu definitions. Each menu item can supply a menu name and a request to be sent to the back-end server when it is selected as well as information on how to display the data when it is returned by the back-end. If the request requires any parameters to be supplied, then and their name and types can be specified in the menu item definition.

With reference to FIG. 4, there is shown an exemplary system 400 and flow illustrating embodiments of the invention. The system 400 can include a front-end system 410 communicatively coupled to a database server 420. Database server 420 is coupled to database 420. Database server 420 is also coupled to file system 440. Database server 420 is also coupled to front-end menu definitions 460 and front-end server configurations 450.

In use, a front-end system 410 makes a request from the database server 420 for menu definitions, in step S1. Next, the database server 420 retrieves a menu definition from the front-end menu definitions 460, in step S3. In addition, database server 420 retrieves one or more front-end server configuration files 450, in step S4. Database server 420 then sends the requested menu definition to the front-end system, in step S6. Once the menu definition is loaded on the front-end system 410, a user can cause the front-end system 410 to request a user selection from the database server 420, in step S7. Database server 420 can access database 430, in step S2, and retrieve data related to the request, in step S5. Database server 420 can also request0 the desired file from file system 440, in step S8, and retrieves the desired file, in step S9. Next, the database server 420 replies to the user request by forwarding the desired user selection, in step S10.

In some embodiments, the steps of the methods can be performed by one or more software programs operating on a computer having a processor and storage as would be known to those skilled in the art, as informed by the present disclosure. The computer can be one or more personal computers, and/or one or more servers, communicatively coupled via a network, such as an intranet, or the Internet. Alternatively, other computer configurations could be employed, as a matter of application specific design choice, as would be known to one skilled in the art, as informed by the present disclosure. In addition, the computer can be any now known, or later developed computing device, and/or handheld computing device, as would be known to one skilled in the art.

FIG. 5 is an exemplary flow chart outlining a method 500 for disseminating database information in accordance with embodiments of the invention. In some embodiments, a user initiates the application, in step 510. Next, the front-end system 410 requests a menu definition from database server 420. In some embodiments, the menu definition can be an XML menu definition. Alternatively, other programming languages can be employed. Next, the application is configured from the menu definition, in step 530. In step 540, the user can select a menu item and/or select a button on the user interface, described in further detail below. Next, a user can be prompted to enter any necessary parameters, in step 550. A request is then sent from the front-end system 410 to the database server 420, in step 560. Next, in step 570, the request is processed by the database server and sent to the front-end system. Finally, a reply is displayed in the required format, in step 580. The user can then select additional menu items or make additional selections via buttons, returning to step 540.

In alternate embodiments, additional steps may be added, certain steps may be excluded, certain steps may be performed multiple times, and/or the steps may be performed in a different order and/or simultaneously.

With reference to FIG. 6, there is shown an exemplary screen shot 600 of an interface for disseminating database information, in accordance with embodiments of the invention. Screen 600 is part of an interface accessed by a user to request a certain data feeds. Screen 600 can include user selectors or buttons for requesting current reference data and historic reference data. User buttons for running the process and for saving a configuration can also be included. If historic data is requested, screen 600 can include a historic configuration region including input fields for region, and business date. An “OK” or equivalent button can be included to initiate the retrieval of historic data. Historic data can be displayed including the fields of region ID, business date, last business date, next business date, system date, month start date, and month end date.

In this example, when a user selects the menu item called ‘Ken Test’ the buttons defined in the <menuItem> tag will appear. The ‘Save’ button is automatically inserted and allows the user to save the report as a text or Excel file. Selecting the ‘Historic Ref Data’ button displays two parameter text boxes which the user can populate before pressing the ‘OK’ button. When this is done, the parameter values are inserted into the request so the following request is sent to the database server 420. The reply is displayed in a table in the application.

In FIG. 7, an exemplary portion of code 700 describing a menu definition file for the interface screen 600 described above is shown. The menu definition file defines the buttons and input fields described above for interface screen 600.

FIG. 8 is an exemplary portion of code 800 defining the format of reply data on interface screen 600, shown in FIG. 6. The code represents a portion of the code portion shown in FIG. 7, with specific values replacing variables. By way of interface screen 900, a user can select “reports.” and thereby initiate a cascading menu having selection options for distribution fees, XCB rec, and stopping and starting sample reconciliation.

With reference to FIGS. 10 and 11, there is shown an exemplary screen 1000 of an interface in accordance with embodiments of the invention, along with a corresponding code portion 1100 including a menu definition file By way of interface screen 1000, a user can select a test button.

With reference to FIG. 12, there is shown a screen 1200 including a report having multiple result sets. With reference to FIG. 13, there is shown an interface screen 1300 displaying a report with three retuned result sets. A corresponding code portion 1400 is shown in FIG. 14.

Thus, embodiments of the invention provide for a front-end system for managing data feeds to a user from a database, and a database server back-end system that employs pre-defined scripts to obtain, format, and disseminate the information in the proper, desired format. The front-end system of the present invention is a front-end system that allows the user to more easily select information to be obtained, and to select the type and format of report to be generated. After the user enters in the requested information, the requested information is retrieved from the database server system and displayed in a desired format.

Embodiments of the present invention include the system 1500, as illustrated in FIG. 15, for executing a file loading procedure. The procedure includes loading datafeeds/files into a database 1510 which includes a Database Server 1520 that executes a program for accessing a Script File 1522 to obtain instructions for searching, formatting and forwarding a data feed to the database 1510. Typically, the Script File 1522 contains a series of custom instructions written in a text-based script language. As an example, a Server 1530 might be instructed to access a particular file from a source 1540 to retrieve specified information and convert this information in a specific format to be loaded into the database 1510. The source 1540 may preferably be for example, a particular file on a file system or a particular queue in a messaging system. The script determines which source to use by the properties specified in table 11 below, which details for example the name of a file and also by the transport methods specified in table 4 above.

The Server 1530 is operatively coupled to the Database Server 1520 such that a plurality of predefined database commands (e.g., SQL commands) is executed. As depicted in FIG. 1, the Server 1530 includes a Commander Module 1532, for example, a SQL Commander, for selecting and executing a query against at least one source 1540, such as a user. When the Server 1530 is called, a request for a particular set of SQL commands is received and the Commander Module 1532 selects the pertinent query for the Source 1540. The Commander Module 1532 executes the predefined SQL statements, and returns a result set to the Server 1530. In turn, the Server 1530 returns the result set to the Database Server 1520.

Once the result set for the particular query is received, the Script File 1522 is again consulted to determine the format for the result set to be loaded into the database 1510. In general, the result set will be in a form that is readable to a user (such as an Excel spreadsheet file, Word file or a PDF file), yet not suitable to be loaded into the database 1510. The result set will be convened to a suitable format, an example of the format to be converted into to be loaded into the database would be plain text or XML. In one example, the database 1510 includes a set of tables into which the data from the result set needs to be loaded. Such data can be converted into a format suitable to be loaded into the tables in the database 1510. In order to convert the result set into the specified format, the Database Server 1520 calls a Conversion Module 1524 for this purpose. The Conversion Module 1524 could be an off-the-shelf module or one that is specially written. Preferably, the Conversion Module 1524 will be implemented in such a way that various different formats are supported and additional ones are easily added.

Even though FIG. 15 discloses two separate computerized servers, server 1530 and a database server 1520, it is obvious to one skilled in the art that one computerized server can also be used to perform the functions of both the server 1530 and the database server 1520.

Referring to FIG. 16, an exemplary method for loading information into the database is illustrated.

First, in step 1602, a script file 1522 is obtained to determine instructions for extracting, formatting and loading a data feed. As discussed above, the script file 1522 is preferably a JAVA properties file. The script file 1522 will typically include the name of the file to be extracted. Next, in step 1604, access to the source 1540 is established as described above, and a call to the server 1530 is initiated. The server 1530 will receive information regarding a set of SQL predefined commands to access. In step 1606, the server 1530 queries the datafeeds from different sources 1540 with the predefined SQL commands. In step 1608, a result set for the particular query is received.

Once the result set is available, the script file 1522 is consulted in step 1610 to determine if any editions are required in the result set received from the source. If no editions are required, then, the script file 1522 is again consulted for the proper format and transport/load method in step 1614. Then, in step 1616, a conversion module is called to format the result set into the proper format specified by the script file 1522. However, if in step 1610 it is determined that edits are required in the result set, then in step 1612, the data in the result set is edited before sending it on to be converted Edits are rather ad-hoc in nature and done preferably via a ‘plug-in’ or system commands. As used herein, a plug-in is some very specific instructions written in a programming language such as Java and system commands are platform dependent instructions. Both of these are invoked from the script to manipulate the data in some way. For example, plug-ins currently used change month names to numbers (e.g. from Jan to 01), or combine two lines in a file together into one line. It is the script file that is being consulted if editions are required but the actual instructions are inside the plug-in. Finally, in step 1618, the converted file is transported to be loaded into the database 1510 indicated in the script file 1522, and processing ends.

Referring to FIG. 17, an exemplary script file 1522 is illustrated. The script file 1522 shown in FIG. 17 instructs the database Server 1520 to load a flat file called “FX_SPOT” into the Database 1510. The Server 1530 interfaces with the Database Server 1520 in order to accomplish the task. It is to be appreciated that the script file 1522 shown in FIG. 17 is provided for illustrative purposes.

As depicted in the example in FIG. 17, the script file 1522 appears as a series of commands in a text file to load the flat file. “FX_SPOT” via a stored procedure. The syntax for the Script File 1522 shown and discussed herein involves a syntax that is close to that of a JAVA properties file. However, it is to be appreciated that the script file could be written in another suitable language so long as it is capable of defining the way in which the data feed is to be extracted, formatted and loaded. However, the use of a JAVA properties file for this purpose is a preferred method of creating the Script File 1522.

As will be discussed in greater detail, the exemplary Script File 1522 shown in FIG. 17 sets forth each of the parameters needed by the Database Server 1520 to extract, format and deliver the data feed to be loaded into the Database 1510. Line 1 of this file is a comment since it starts with the number (#) sign. Line 2 defines the file name which in this example is “FX_SPOT”. Line 3 defines the file name extension such as .txt or .xls, or as in this case, it is none. Line 4 defines if the file has a header line then the property ‘FileHasHeader’ should be set to true so that the stored procedure is not called for this line, otherwise, it should be set to false. Line 5 defines the procedure to call that is executed by the Database Server 150. Initially it calls a stored procedure ‘kap_file_load’, in line 5 and then it calls the stored procedure ‘kap_fxrate_load’ in line 6 for each line in the file. Only the columns 7 and 19 (in bold) will be passed as parameters to the stored procedure and all the other columns of data in the file will be ignored. The stored procedure ‘kap_file_load’ will be called again in line 7 once all the lines in the file have been loaded.

The properties can be used to load data from a file using a stored procedure call for each line in the file as shown in Table 10 below.

TABLE 10 Property Description Values Default FileHasHeader Indicated if the file has a Boolean false header or not FileIgnoreLine The line in the file will be String null ignored if it starts with the given text FileIgnoreQuotes If any column in the file is String null contained within the quote characters specified, then they will be removed FileIgnoreQuotesCol<n> If column <n> in the file is String null contained within the quote characters specified, then they will be removed DateParameterFormat The format of dates in the file Java Date yyyy-MM-dd which will be passed as Format String parameters to a stored procedure when the file is loaded TimeParameterFormat The format in which a Java Format yyyy-MM-dd date/time type is passed to a String HH:mm stored procedure DateFormats List of formats that may be Comma null returned by a command that separated list of contains the → <n> [,<n>] Java Format Syntax Strings

File Name Configuration

The properties allow file names and their location to be specified as shown in Table 11 below.

TABLE 11 Property Description Values Default FileName The name of the file to be File name null loaded or written FileExt The file extension to be String null appended ReportsDir The directory where the file Directory Path Current should be written (before/after directory transporting or copying to sent directory CompletionFileName The name of a file to be sent String null after the feed file is sent SentDirectory The sub-directory in Directory name SENT “ReportsDir” where the sent file is moved after transporting and adding any necessary date suffix ReceivedDirectory The sub-directory in Directory name RECEIVED “ReportsDir” where the received file is moved after transporting and adding any necessary date suffix DateSuffix Is date to be appended when Boolean true moved to SENT or RECEIVED directory SuffixDateFormat The format of any date suffix to Date Format yyyyMMdd be appended String LeaveReceivedFileCopy Whether the file should be left Boolean false (which in the “ReportsDir” directory implies that and not moved to the the file is “ReceivedDirectory” moved) UnixCopyCommand The Unix command to be used Any Unix copy /usr/bin/cp to move the received file to the command and “ReceivedDirectory”. Only parameters applicable if the property “LeaveReceivedFileCopy” is set to true FileAlreadyExists A file should not be created by Boolean false the feed as it already exists

Date and Region Configuration

The properties allow the feed date and region to be configured as shown in Table 12 below.

TABLE 12 Property Description Values Default TMinusOne Changes the feed date to T − 1. Note this Boolean false is T − 1 in calendar days not business days (see FeedDate) FeedDate Changes the feed date to the given date. dt_bus_lst, null Note, this requires a call to the stored dt_end_mth, procedure erebus_get_feeddate dt_end_mth_fin FileRegion Populates %FEEDREGION% in the String null feed file name FileDateFormat Date format if %FEEDDATE% is Date Format yyyy-MM-dd included in the file name String FeedDateFormat Date format if %FEEDDATE% is Date Format yyyy-MM-dd included in sql or a stored proc String parameter

Additionally, instead of loading data from a file by calling a stored procedure, an alternative and preferably faster method is to bulk load selected columns from the file into a temporary table and then use a stored procedure to manipulate the data in the temporary table. Although, not shown, similar functionality exists to load a file that is in XML format.

In a preferred embodiment of the present invention, a feature referred to herein as “Control Feeds” is added within the script, which could either be script 122 or script 1522. This allows for parts of the script to be executed multiple times using timers and loops and also allows the flow of control of the commands to be altered when an exception occurs. Examples of such exceptions are database deadlock, connection failure etc. In this embodiment, the database is preferably polled on a timer. So, if a timer is set, for example, for every ten minutes, then there would be a pause for ten minutes between multiple extractions of data over time. For example, the sequence could be as follows: extract data, transport it, wait for 10 minutes and then repeat the sequence. Similarly, in the reverse procedure, there would be a pause between extracting the information from the source and then performing the task of transporting to be loaded into the database. In another example, during the process of extracting information from the database or loading the information into the database, if a database connection failure or a deadlock is detected, the script then defines the instructions and/or steps to take as a reaction to that failure. As known to one skilled in the art, a deadlock is a condition that can arise in a database. For example, a deadlock is where a first process has locked resource A and is waiting to lock another resource B, but at the same time a second process has locked the resource B and is waiting to lock the resource A. This way, the two processes will wait forever (which is a deadlock) and most databases in the prior art detect these and delete one of the processes involved. The present invention however allows for the deadlock to be handled by allowing instructions in the script which describe what to do if a deadlock (or connection failure, or other similar event) is detected. The steps may preferably include a re-run of the command to attempt to reconnect to the database at a later time or to call another part of the script. By calling another part of the script, another chain of instructions in that script file is invoked. A script file may contain a number of separate sets of instructions. Some sets of instructions will never be invoked unless a specific set of circumstances arises. For example, if a set of instructions is being executed and an exception happens (such as a database connection is lost) then a property with the name ‘RunOnException’ will be looked for and the set of instructions specified there will be run. For example:

   ErebusFeed.FeedNames=MainFeed    ErebusFeed.MainFeedType=Connection    ErebusFeed.ExceptionHandlerType=FlatFile    .MainFeed.sql_to_call1= { call load_data( ) }    .ExceptionHandler.sql_to_call1= { call flag_error([1N;12;%LASTEXCEPTION%]) }

MainFeed.RunOnException=ExceptionHandler

In normal circumstances the instructions defined by ‘MainFeed’ will be the only ones executed, but if an exception happens, then the instructions defined by ‘ExceptionHandler’ will be executed. So, in other words, the control feeds controls the flow of the data such as to when to extract information from the database or load information into the database and based on the running condition of the script, decide on whether to transport that information if some error occurs.

Exemplary properties that control the flow of the feeds and output to the log files are shown in Table 6 below.

TABLE 6 Property Description Values Default FeedDisabled When set the true the feed will Boolean false terminate immediately it is started HeartBeatMessage Heart beat message to be String null output in order to provide continuing updates to the log file HeartBeatInterval Number of seconds between Integer 3600 output of each heart beat message SystemProperties System properties to be output Space user.name os.version to the log file Separated java.home List java.class.path CallSqlOnStartup Call the ‘sql_to_call<n>’ when Boolean true the feeds starts. If set the false they will need to be called from another feed SQLLoopTimer Continually perform the SQL Integer 0 in a loop at the specified interval (in seconds) SQLLoopSkip When performing SQL in loop Comma null on SQLLoopTimer skip the separated list specified SQL of SQL indexes SQLLoopBackoffIf If the property value appears String null anywhere in output from a stored procedure print statement, then the SQLLoopTimer value will be increased by the ‘By’ property, up to the ‘Limit’ property below SQLLoopBackoffBy Amount to increase the Integer 0 SQLLoopTimer value by if SQLLoopBackoffIf values appears in stored procedure print output SQLLoopBackoffLimit Limit of increase for Integer or 0 SQLLoopTimer. May take the comma form or one of more “<limit> separated list from HH:MM” items to specify limits for time periods FeedLoopTimer Continually perform the feeds Integer 0 in a loop at the specified interval (in seconds) ContinueOnSQLException If an exception occurs in SQL Boolean false or a stored procedure further SQL to call will not be performed unless this property is set to true ContinueSQLLoopOnSQLException Setting this property to true Boolean false will continue with any SQLLoop when an exception occurs in SQL or a stored procedure ContinueOnException If multiple feeds are invoked Boolean false then if an exception occurs further feeds will not be started unless this property is set to true ContinueOnExceptionIn<feed> If an exception occurs in feed Boolean false <feed> further feeds will not be started unless this property is set to true RunOnException List of feeds to run when an Space null exception is encountered Separated List RunOnExceptionIn<feed> List of feeds to run when an Space null exception is encountered in Separated feed <feed> List RunOnDeadlockException List of feeds to run when an Space null deadlock exception is Separated encountered List RunOnDeadlockExceptionIn List of feeds to run when an Space null <feed> deadlock exception is Separated encountered in feed <feed> List RunOnConnectionException List of feeds to run when an Space null connection failure exception is Separated encountered List RunOnConnectionExceptionIn List of feeds to run when an Space null <feed> connection failure exception is Separated encountered in feed <feed> List RunOnSQLException List of feeds to run when an Space null SQL exception is encountered Separated List RunOnSQLExceptionIn<feed> List of feeds to run when an Space null SQL exception is encountered Separated in feed <feed> List RunOnJMSException List of feeds to run when a Space null JMS exception is encountered Separated List RunOnJMSExceptionIn<feed> List of feeds to run when a Space null JMS exception is encountered Separated in feed <feed> List RunOnRaiseError<error> List of feeds to run when a Space null “raiseerror” is called from a Separated stored procedure with error id List <error> ContinueFeedAfterRunOnException Continue the feed that gave the Boolean false exception after any feeds to be run on exception have completed. Otherwise the feed that gave the exception is stopped. ReportRunOnExceptionAs How the exception that exception, null resulted in feeds being run on warning, that exception is reported. If information, not specified then by default ignore all linked exceptions are reported. If specified the actual exception is reported as required. ContinueOnFileLoadException Continue to load a file even if Boolean false an error occurs loading a line because there are not the expected number of columns LogResults If set to true the result sets Boolean false from SQL called will be written to the log file LogResultsFor<feed> If set to true the result sets Boolean false from SQL called by the feed <feed> will be written to the log file LogMaxLineLength If set to greater than zero then Integer 0 any log output line longer than the value will be truncated SingleInstancePort Set to an agreed/allocated port Integer 0 to restrict a feed to only one instance running at the one time. SingleInstanceReplace If an existing instance is Boolean false running already, then the new instance will kill the old instance effectively replacing it.

In another preferred embodiment of the invention, a feature referred to herein “Schedule Feeds,” is added to either the script 122 or 1522. This allows any part of the script or any feed within the script to be given or identified by a date and a time associated with it. It is similar to control feeds except that instead of being controlled on a time, it is being controlled from within the feed itself. So, it provides for a scheduler to execute commands for the feed rather than it running on a certain time or falling in a particular interval. This gives the ability to allow a test harness to be built for a specific script so that script itself can be used to run other scripts as kind of a test. As is known to those skilled in the art, a test harness is a way of invoking scripts in a controlled way so as to test that they perform as expected. Ideally, if any of the scripts was changed, then the test harness could be run in order to ensure that everything still worked as expected. Further, instead of scheduling using the operating system scheduler, one can use a scheduler within a scripting engine or that location itself and the application that is running the script will also have a scheduler built into it. So inside the script file, various jobs/commands can be scheduled to run at different times.

The ‘Schedule feed” allows a feed to be run immediately or at a pre-determined date and time either inside the same process as the Scheduled feed, or invoked as an external process. Any number of individual feeds can be specified in the Scheduler properties file in the script. An individual feed can be scheduled using a property with the following form:

. Schedule<name>=<when> EXEC|API <feed> where <name> is a unique name for the feed    <when> is a date/time, or ‘Now’)    <feed> is either a command or feed parameters

Any number of lines as shown above may appear in order to schedule feeds. Each name should be unique to the script. The <when> field indicates the date and the time that the feed should be scheduled for, or ‘Now” if it is to be scheduled immediately. EXEC implies the feed should be invoked as an external process and API invoked within the same process as the Schedule feed. The parameters are explained in more detail below

A command would take the usual form “<Feed Name><Region><Options>”. Note the use of the \ character to split the property over multiple lines. The feed parameters required would be as follows (in no particular order) plus any other parameters as necessary:

-f<feed name> \ -r<region> \ -property UserPropertiesFile=properties/<filename>.properties \ -property UserPropertiesDir=<path to UserPropertiesFile>

The feed name is a unique name for the feed and may be the same or different to the name next to ‘Schedule’. Region is an instance indicator. The properties UserPropertiesDir and UserPropertiesFile provide the location and the file name of the script being scheduled.

As discussed above, one of the main purpose of the ‘Scheduler’ feed type is to provide an easy way to run feeds as part of a regression test harness. An example of a script file 1800 as part of a test harness is illustrated in FIG. 18. It consists of two feeds, a set up feed which simply creates an output directory for the feed files and the scheduler itself. The two feeds form the test harness. The first one isn't testing anything however, it is simply performing initial set up required in order that the tests can be run; in this case, it is creating a folder that contains the date. The second feed is the scheduler itself, which will perform the list of scheduled scripts specified in the script file. The parameter ‘-x’ is specified in the script file (as a default, rather than being passed into the feed) in order to define a set of defaults such as no transport method, the location of all the script files within the file system and the reports directory created in the set up feed. It is inserted into the parameter list of the individual feeds by “%-x %”. Any of these scripts can be overwritten by the individual feeds (for example the Standard Trade feed uses a script file in user's own properties directory rather than in the one specified in the set of defaults. Other parameters can be passed into the feeds (for example -pESW in the Hedge Funds feed). All the feeds are run via the application programming interface (API). and only one log file is produced which will require to be checked for any exceptions, and all output files will be written to one directory.

Although illustrative embodiments of the present invention have been described herein with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various other changes and modifications may be affected therein by one skilled in the art without departing from the scope or spirit of the invention. 

21. A system for managing a plurality of data feeds to a user device from a database, the system comprising: a server configured to generate a request for a result set; a database server coupled to the server and receiving the request, the database server including a commander module for executing a query against the database, the server calling the database server in order to invoke the commander module to execute predefined statements and return a result set to the database server; the server accessing a conversion module upon receiving the result set, the conversion module providing instructions to convert the result set to a readable format and to transmit the result set in a readable format to the user device, wherein the database server transmits the result set to the user device in response to the instructions.
 22. The system of claim 21, further comprising a script file accessed by the server, the script file containing instructions for creating, formatting, and forwarding a data feed.
 23. The system of claim 22, wherein the script file includes a name of the database to access.
 24. The system of claim 21, wherein the database server queries the database with predefined SQL commands.
 25. The system of claim 21, further comprising a front-end system allowing configuration of the data requests.
 26. The system of claim 25, further comprising a data driven web site at the front-end system receiving the result set.
 27. The system of claim 25, further comprising a front-end menu structure specified by a document containing menu definitions, the menu structure containing menu items supplying a menu name and the request to be transmitted.
 28. The system of claim 21, further comprising a file system coupled to the database server.
 29. The system of claim 25, wherein the front-end system requests menu definitions from the database server and the database server retrieves front end menu definitions.
 30. The system of claim 29, wherein the front-end system displays selectable menu items on a user interface.
 31. A method for managing a plurality of data feeds to a user device from a database, the method comprising: generating, from a server, a request for a result set; receiving the request at a database server coupled to the server, executing a query against the database by invoking a commander module of the database server upon receiving the request, the commander module for executing a query against the database to execute predefined statements; returning a result set from database server to the server; accessing a conversion module at the server upon receiving the result set; executing instructions of the conversion module to convert the result set to a readable format; and transmitting the result set in a readable format from the database server to the user device.
 32. The method of claim 31, further comprising accessing a script file from the server, the script file containing instructions for creating, formatting, and forwarding a data feed.
 33. The method of claim 32, wherein the script file includes a name of the database to access.
 34. The method of claim 31, further comprising querying the database from the database server with predefined SQL commands.
 35. The method of claim 31, further comprising allowing configuration of the data requests using a front-end system.
 36. The method of claim 35, further comprising receiving the result set at a data driven web site at the front-end system.
 37. The method of claim 35, further comprising providing a front-end menu structure specified by a document containing menu definitions, the menu structure containing menu items supplying a menu name and the request to be transmitted.
 38. The method of claim 31, further comprising coupling a file system to the database server.
 39. The method of claim 35, further comprising requesting menu definitions by the front-end system from the database server and retrieving the front end menu definitions at the database server.
 40. The method of claim 39, further comprising displaying selectable menu items on a user interface of the front-end system. 